
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type AttachmentRequest struct {

	AttDir string `json:"att_dir" form:"att_dir"`

	AttSize string `json:"att_size" form:"att_size"`

	AttType string `json:"att_type" form:"att_type"`

	AttachmentCategoryId string `json:"attachment_category_id" form:"attachment_category_id"`

	Name string `json:"name" form:"name"`

	RealName string `json:"real_name" form:"real_name"`

	UploadWay string `json:"upload_way" form:"upload_way"`

	Url string `json:"url" form:"url"`

	UserId string `json:"user_id" form:"user_id"`

}

func (r *AttachmentRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *AttachmentRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"att_dir": "required",

		"att_size": "required",

		"att_type": "required",

		"attachment_category_id": "required",

		"name": "required",

		"real_name": "required",

		"upload_way": "required",

		"url": "required",

		"user_id": "required",

	}
}

func (r *AttachmentRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AttachmentRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AttachmentRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
